<!DOCTYPE html>
<!--
     SPDX-License-Identifier: CC-BY-SA-4.0
     SPDX-FileCopyrightText: 2020 seL4 Project a Series of LF Projects, LLC.
-->
<!-- Page last generated 2025-02-20 03:16:15 +0000 -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>seL4 on the BeagleBoard | seL4 docs</title>

    <!-- Our stylesheet and theme stylesheet.  Contains bootstrap. -->
    <link rel="stylesheet" href="/assets/css/style.css" type="text/css">
    <!-- Font awesome -->
    <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <!-- Pygments syntax highlighting  -->
    <link rel="stylesheet" href="/assets/css/highlighting/trac.css" type="text/css">
    <link rel="icon" type="image/x-icon" href="/assets/favicon.ico"><script defer data-domain="docs.sel4.systems"
	    src="https://analytics.sel4.systems/js/script.js"></script></head>

  <body class="container-fluid">

    



<header>
  <ul class="row menu">
    <li class="col-xs-12 col-md-2" >
            <a href="https://sel4.systems" class="skip-icon">
              <img class="img-responsive" src="/assets/logo-text-white.svg" alt="seL4 logo" />
            </a>
    </li>
    <li class="col-xs-12 col-md-10 menu">
      <nav aria-label="Banner links">
        <h2><a href="/Resources" />Resources</h2>
        <h2><a href="/processes" />Contributing</a></h2>
        <h2><a href="/projects" />Projects</h2>
        <h2><a href="/Tutorials" />Tutorials</h2>
        <iframe title="DuckDuckGo search bar" src="https://duckduckgo.com/search.html?site=docs.sel4.systems&prefill=Search%20sel4.systems" style="overflow:hidden;margin-bottom:10px; padding:0;height:40px;float:right;border-width: 0px"></iframe>
      </nav>
    </li>
  </ul>
  <div class="clear"></div>
  
<div class="breadcrumbs bootstrap hidden-sm-down">
  <nav class="sel-breadcrumb" aria-label="Breadcrumb" >
    <ol class=" list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">
      
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/">
              <span property="name"><b>seL4 Docs</b></span>
            </a>
            <meta property="position" content="1" />
        </li>
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/Hardware/">
              <span property="name"><b>Supported platforms</b></span>
            </a>
            <meta property="position" content="2" />
        </li>
      
        

        
          <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <span property="name">seL4 on the BeagleBoard</span>
            <meta property="position" content="3" /></li>
          
    </ol>
  </nav>
  <nav class="sel-version" aria-label="Current Versions">
    <ol class="list-unstyled">
      <li class="list-unstyled text-right" style="margin-left:auto; padding:0rem 0rem;">
        Current versions:</li>
      <li class="list-unstyled text-right">
      <a href="/releases/sel4/13.0.0"><b>seL4-13.0.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/microkit/1.4.1"><b>microkit-1.4.1</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/camkes/camkes-3.11.0"><b>camkes-3.11.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/capdl/0.3.0"><b>capDL-0.3.0</b></a></li>
      </ol>
  </nav>
  <div class='clear'></div>
</div>


</header>

    <main>
      <div class="row">
  <div class="hidden-xs col-sm-4 col-md-3 col-lg-2">
    


<div class="sidebar">
















</div>

  </div>
  <div class="col-sm-8 col-md-9 col-lg-8 main">
    
    <div class="content">
      <h1 id="sel4-on-the-beagleboard">seL4 on the BeagleBoard</h1>

<p>This page documents booting seL4 on the
<a href="http://beagleboard.org/beagleboard">Beagleboard</a>, Omap
3530</p>

<p>See <a href="http://sel4.systems/pipermail/devel/2014-August/000030.html">Tim Newsham’s post</a> on the mailing list for one user’s experience.</p>

<h2 id="preparing-your-sd-card">Preparing your SD card</h2>
<h3 id="prologue">Prologue</h3>
<p>These instructions are for
later versions of the Beagleboard. Before the Xm, U-Boot and MLO were
held in flash.</p>

<p>The first stage boot loader expects to find the TI X-loader in the root
of a FAT filesystem, on the first partition of the SD card with the name
MLO.</p>

<p>MLO expects to find a file named u-boot.bin in the root directory of the
SD card.</p>

<h2 id="setting-up-minicom">Setting up Minicom</h2>
<p>Plug the board in. seL4 userspace currently
does no power management — you will probably need a 5V power source, and
not rely on powering the board over USB</p>

<p>If you do not have minicom installed:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt-get <span class="nb">install </span>minicom
</code></pre></div></div>

<p>If you are connecting via a USB serial adapter:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>minicom <span class="nt">-s</span> ttyUSB0
</code></pre></div></div>
<p>And if you were connecting via a <strong>real</strong> serial port:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>minicom <span class="nt">-s</span> ttyS0
</code></pre></div></div>

<p>In either
case, this will take you to a configuration menu.</p>

<ol>
  <li>Choose Serial Port Setup</li>
  <li>Set A: Serial Device to <code class="language-plaintext highlighter-rouge">/dev/ttyUSB0</code> or <code class="language-plaintext highlighter-rouge">/dev/ttyS0</code> depending on
  which serial device you want to use.</li>
  <li>Set F: Hardware Flow Control to No</li>
  <li>Set speed to <code class="language-plaintext highlighter-rouge">115200</code> and eight bit no parity.</li>
  <li>Save setup as <code class="language-plaintext highlighter-rouge">ttyUSB0</code> or <code class="language-plaintext highlighter-rouge">ttyS0</code></li>
  <li>Exit Minicom</li>
</ol>

<p>You can now connect to the !BeagleBoard using Minicom:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>minicom ttyUSB0
</code></pre></div></div>

<p>Or:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>minicom ttyS0
</code></pre></div></div>

<h3 id="permissions">Permissions</h3>
<p>If you get permissions errors you need to add yourself to the
appropriate group. Find out which group on your machine has access to
the serial ports (on Debian, it’s usually dialout):</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-l</span> /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Aug 11 09:43 /dev/ttyUSB0
</code></pre></div></div>

<p>Then add yourself to the right group:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>usermod <span class="nt">-G</span> dialout <span class="nt">-a</span> your_login_name
</code></pre></div></div>

<h3 id="u-boot">U-Boot</h3>
<p>Now minicom should connect to what
it thinks is a “modem”, and then give you a good old console to work
with. You are now in the bootloader, U-Boot, of the ~BeagleBoard. You
can type commands here and it’ll display the results.</p>

<p>Some quick useful commands:</p>

<table>
  <thead>
    <tr>
      <th>Command</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>help</td>
      <td>display list of commands</td>
    </tr>
    <tr>
      <td>printenv</td>
      <td>lists defined environment variables</td>
    </tr>
    <tr>
      <td>mmc init</td>
      <td>initialise MMC (to read the the SD card)</td>
    </tr>
    <tr>
      <td>mmcinfo</td>
      <td>display current SD card info</td>
    </tr>
    <tr>
      <td>fatls mmc 0</td>
      <td>display list of files on SD card 0</td>
    </tr>
    <tr>
      <td>fatload</td>
      <td>load script/image into some RAM address to be run</td>
    </tr>
    <tr>
      <td>run</td>
      <td>run scripts</td>
    </tr>
    <tr>
      <td>bootelf</td>
      <td>boot into en ELF image</td>
    </tr>
  </tbody>
</table>

<h2 id="running-sel4test">Running seL4test</h2>

<p>Checkout the sel4test project using repo as per <a href="/seL4Test">seL4Test</a></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>repo init <span class="nt">-u</span> https://github.com/seL4/sel4test-manifest.git
repo <span class="nb">sync
mkdir </span>cbuild
<span class="nb">cd </span>cbuild
../init-build.sh <span class="nt">-DPLATFORM</span><span class="o">=</span>omap3 <span class="nt">-DAARCH32</span><span class="o">=</span>1
<span class="c"># The default cmake wrapper sets up a default configuration for the target platform.</span>
<span class="c"># To change individual settings, run `ccmake` and change the configuration</span>
<span class="c"># parameters to suit your needs.</span>
ninja

</code></pre></div></div>

<p>Generated binaries can be found in the <code class="language-plaintext highlighter-rouge">images/</code> directory.</p>

<p>Which after a few minutes should give you:</p>

<p>Now, the ELF image we
boot into is the <code class="language-plaintext highlighter-rouge">sel4test-driver-image-arm-omap3</code> file. 
Copy that file onto the sdcard (the boot loader will be able to load images into RAM from a FAT image: there is no need to do an image copy). If your SD card is not formatted, just format it using FAT32.
Plug the SD card back into the BeagleBoard and reset the board by pressing the <code class="language-plaintext highlighter-rouge">S2</code> (reset) button.</p>

<h3 id="to-run-the-image">To run the image:</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mmc init
mmcinfo
fatload mmc 0 ${loadaddr} sel4test-driver-image-arm-omap3
bootelf ${loadaddr}
</code></pre></div></div>
<p>where loadaddr
is some address, in this example defined as an environment variable.</p>

<p>Note: by default, the image produced is relocated to run at address 0x82000000. If you want to change the address, you need to modify the file <code class="language-plaintext highlighter-rouge">projects/tools/elfloader-tool/gen_boot_image.sh</code> (look for the omap3 case). For the Beaglebone Black Rev A5, RAM is from address 0x80000000 - 0x9FFFFFFF.</p>

<p>Depending on the uBoot version present on the Beaglebone, the <code class="language-plaintext highlighter-rouge">bootelf</code> command might not be present. You can use the <code class="language-plaintext highlighter-rouge">go</code> command instead. I.e.:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mmc init
mmcinfo
fatload mmc 0 0x82000000 sel4test-driver-image-arm-omap3
go 0x82000000
</code></pre></div></div>

<p>After this you should start seeing output from seL4test.</p>

<p>Tip: if you don’t remember the name of the images on your SD card, you can use:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fatls mmc 0
</code></pre></div></div>
<p>to see what is on the SD card.</p>

    </div>
  </div>
</div>

    </main>
    


<footer class="site-footer">

  <h2 class="footer-heading">seL4 docs</h2>

  <div class="footer-col-wrapper">

    <div class="col-md-2">
      



<ul class="social-media-list">
  <li><a href="https://github.com/sel4"><i class="fab fa-github"></i> <span class="username">sel4</span></a></li><li><a href="https://github.com/sel4proj"><i class="fab fa-github"></i> <span class="username">sel4proj</span></a></li>
</ul>

    </div>

    <div class="col-md-8">
      <ul class="list-unstyled">
        <li>
          This site is for displaying seL4 related documentation.  Pull requests are welcome.
        </li>
        
          <li>
            Site last updated: Fri Feb 7 10:17:38 2025 +1100 ee78c8857c
          </li>
          <li>
                Page last updated: Thu Nov 11 11:50:06 2021 +1100 5fc78c1c47
          </li>
        
      </ul>
    </div>
    <div class="col-md-2">
<a href="https://github.com/seL4/docs/blob/master/Hardware/BeagleBoard.md">View page on GitHub</a>
      <br />
      <a href="https://github.com/seL4/docs/edit/master/Hardware/BeagleBoard.md">Edit page on GitHub</a>
      <br />
      <a href="/sitemap">Sitemap</a>
    </div>

  </div>

</footer>

  </body>
</html>
